
************************************************************
*  Regressions in Online Appendix Table 3
************************************************************

clear
# delimit ;
version 11;
set matsize 1000;
capture log close;
set more 1;
log using table_appendix3.log, replace;

************************************************************;
* Regressions using data by 1-year age group (columns 1-3);
************************************************************;

use data_1yr_stacked;

gen yob=1959-age;
gen time=yob-1915;

*  Proportion married;
*  Women age 18-44;
reg marrf sr10a lnpopm urbshf i.yob i.regno i.regno#c.time, cluster(regno);
reg marrf sr5a lnpopm urbshf i.yob i.regno i.regno#c.time, cluster(regno);
reg marrf sr15a lnpopm urbshf i.yob i.regno i.regno#c.time, cluster(regno);

*  Men age 18-44;
reg marrm sr10a lnpopf urbshm i.yob i.regno i.regno#c.time, cluster(regno);
reg marrm sr5a lnpopf urbshm i.yob i.regno i.regno#c.time, cluster(regno);
reg marrm sr15a lnpopf urbshm i.yob i.regno i.regno#c.time, cluster(regno);

*  Birth rate;
*  Women age 18-44;
reg brate sr10a lnpopm urbshf i.yob i.regno i.regno#c.time, cluster(regno);
reg brate sr5a lnpopm urbshf i.yob i.regno i.regno#c.time, cluster(regno);
reg brate sr15a lnpopm urbshf i.yob i.regno i.regno#c.time, cluster(regno);


************************************************************;
* Regressions using data by 5-year age group (columns 4-8);
************************************************************;

clear;
use data_5yr_stacked;

quietly tab regno, gen(reg);
quietly tab agegroup, gen(agegroup);

gen lgreg=0;
replace lgreg=1 if north==1;
replace lgreg=2 if norwest==1;
replace lgreg=3 if central==1;
replace lgreg=3 if regno==16;
replace lgreg=4 if cenchern==1;
replace lgreg=5 if volga==1;
replace lgreg=6 if povolzh==1;
replace lgreg=7 if ncauc==1;
replace lgreg=8 if urals==1;
replace lgreg=9 if esib==1;
replace lgreg=10 if wsib==1;
replace lgreg=11 if fareast==1;

gen time=0 if agegroup==1;
replace time=1 if agegroup==2;
replace time=2 if agegroup==3;
replace time=3 if agegroup==4;
replace time=4 if agegroup==5;
replace time=5 if agegroup==6;
replace time=6 if agegroup==7;

*  Married fertility rates;
*  Age 16-44;
reg asbrm sr10a lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrm sr5a lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrm sr15a lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);

*  Unmarried fertility rates;
reg asbrnd sr10a lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrnd sr5a lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg asbrnd sr15a lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);

*  % Out-of-wedlock births;
*  Age 16-44;
reg nodad sr10a lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg nodad sr5a lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);
reg nodad sr15a lnpopm urbshf i.agegroup i.regno i.regno#c.time if agegroup !=7, cluster(regno);

*  Very large age gap at marriage (11+ years);
*  Women age 16-49;
reg vlargegap sr10a lnpopm urbshf i.agegroup i.regno i.regno#c.time, cluster(regno);
reg vlargegap sr5a lnpopm urbshf i.agegroup i.regno i.regno#c.time, cluster(regno);
reg vlargegap sr15a lnpopm urbshf i.agegroup i.regno i.regno#c.time, cluster(regno);
clear;

*  Divorce regressions (diffeent age groups than previous regressions);
use data_5yr_stacked_div;

gen time=0 if agegroup==1;
replace time=1 if agegroup==2;
replace time=2 if agegroup==3;
replace time=3 if agegroup==4;
replace time=4 if agegroup==5;

quietly tab agegroup, gen(agegroup);

gen lgreg=0;
replace lgreg=1 if north==1;
replace lgreg=2 if norwest==1;
replace lgreg=3 if central==1;
replace lgreg=3 if regno==16;
replace lgreg=4 if cenchern==1;
replace lgreg=5 if volga==1;
replace lgreg=6 if povolzh==1;
replace lgreg=7 if ncauc==1;
replace lgreg=8 if urals==1;
replace lgreg=9 if esib==1;
replace lgreg=10 if wsib==1;
replace lgreg=11 if fareast==1;

gen lnpop=log(pop);
gen lnpopu=log(popu);
gen lnpopr=log(popr);
gen urbsh=(popmu+popfu)/(popm+popf) ;

*  Age 18-49;
*  Divorces per 1000 married population in each age group;
reg divr sr10a lnpop urbsh i.agegroup i.regno i.regno#c.time, cluster(regno);
reg divr sr5a lnpop urbsh i.agegroup i.regno i.regno#c.time, cluster(regno);
reg divr sr15a lnpop urbsh i.agegroup i.regno i.regno#c.time, cluster(regno);

log close;




